package thread.dn;

/**
 *
 */
class MyThread01 extends Thread {
    @Override
    public void run() {
        String tName = Thread.currentThread().getName();
        while (true) {
            System.out.println(tName + "->MyThread01.run()");
        }
    }
}

class MyThread02 extends Thread{
    @Override
    public void run() {
        String tName=Thread.currentThread().getName();
        while(true) {
            System.out.println( tName+ "->MyThread02.run()");
        }
    }
}

public class ThreadDemo01 {

    public static void main(String[] args) {
        Thread t1 = new MyThread01();
        Thread t2 = new MyThread02();
        t1.start();
        t2.start();
    }
}
